Dynomotion

Group: DynoMotion Message: 14449 From: lmp582002 Date: 2/23/2017
Subject: KmotionCNC Bug??
Howdy,

I am seeing some strange behavior in Kmotion CNC. I wrote a user program M105 to take the X axis to a safe position, (execute/wait see below). When I run the program it moves X to where I would like. So far so good. Then I try to run the M105 in a G-Code program.

M105
G00 Y10
M30

The M105 moves to the correct X coordinate (-0.25), and Y moves. Now I manually jog the X axis to 5", and run the g code again. X moves to the correct position (-0.25), but when the G-code hits M30 it rewrites the X position back to where it started (5"). So I hit cycle start to run the g-code again. The control thinks the position is at 5" so it moves -5.25". This is way out of position. I dont have any program attached to M30.

This is very strange. Sometimes everything works, and other times it does what I described above. Why would KMotionCNC not always track the position commanded in the C program? When I look at "Machine Coordinates" it seems that the position is okay there.

Any suggestions??


#include "KMotionDef.h"
#define stpIN 1910

main()
{

Move(5,((-25.9672-.25)*stpIN));
    while (!CheckDone(5)) ; // loop until motion completes 

}


Group: DynoMotion Message: 14450 From: Tom Kerekes Date: 2/23/2017
Subject: Re: KmotionCNC Bug??
Try configuring as Exec/wait/sync. 

Regards
TK

On Feb 23, 2017, at 9:27 PM, lmp582002@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:

 

Howdy,


I am seeing some strange behavior in Kmotion CNC. I wrote a user program M105 to take the X axis to a safe position, (execute/wait see below). When I run the program it moves X to where I would like. So far so good. Then I try to run the M105 in a G-Code program.

M105
G00 Y10
M30

The M105 moves to the correct X coordinate (-0.25), and Y moves. Now I manually jog the X axis to 5", and run the g code again. X moves to the correct position (-0.25), but when the G-code hits M30 it rewrites the X position back to where it started (5"). So I hit cycle start to run the g-code again. The control thinks the position is at 5" so it moves -5.25". This is way out of position. I dont have any program attached to M30.

This is very strange. Sometimes everything works, and other times it does what I described above. Why would KMotionCNC not always track the position commanded in the C program? When I look at "Machine Coordinates" it seems that the position is okay there.

Any suggestions??


#include "KMotionDef.h"
#define stpIN 1910

main()
{

Move(5,((-25.9672-.25)*stpIN));
    while (!CheckDone(5)) ; // loop until motion completes 

}


Group: DynoMotion Message: 14451 From: Federico Javier de la Cruz Riz Date: 2/24/2017
Subject: Re: KmotionCNC Bug??

I believe something similar happened to me, i've solved it using the option: run,wait and sync (options of m code). When called c program with run and wait(for atc) as i move the position to do the atc routine in c, when return from program execution strange things happen with the axis.

El 24/02/2017 02:27, "lmp582002@... [DynoMotion]" <DynoMotion@yahoogroups.com> escribió:
 

Howdy,


I am seeing some strange behavior in Kmotion CNC. I wrote a user program M105 to take the X axis to a safe position, (execute/wait see below). When I run the program it moves X to where I would like. So far so good. Then I try to run the M105 in a G-Code program.

M105
G00 Y10
M30

The M105 moves to the correct X coordinate (-0.25), and Y moves. Now I manually jog the X axis to 5", and run the g code again. X moves to the correct position (-0.25), but when the G-code hits M30 it rewrites the X position back to where it started (5"). So I hit cycle start to run the g-code again. The control thinks the position is at 5" so it moves -5.25". This is way out of position. I dont have any program attached to M30.

This is very strange. Sometimes everything works, and other times it does what I described above. Why would KMotionCNC not always track the position commanded in the C program? When I look at "Machine Coordinates" it seems that the position is okay there.

Any suggestions??


#include "KMotionDef.h"
#define stpIN 1910

main()
{

Move(5,((-25.9672-.25)*stpIN)) ;
    while (!CheckDone(5)) ; // loop until motion completes 

}